;
var APP_DEV_ENV =0, // 1开发环境 0生产环境
    DEV_TEST = 1, // 1生产环境 0联调环境
    appJoin = APP_DEV_ENV ? "?" : "",
    appType = {
        "insert": "insert",
        "del": "del",
        "sel": "sel",
        "update": "update",
    },
    moveObj,// 移动轨迹全局变量
    __ = function (x) {
        console.log(x);
    };

if (APP_DEV_ENV) {
    appType.insert = "sel";
    appType.del = "sel";
    appType.update = "sel";
}

// 用于 警情研判 轨迹跟踪 下的 定时器
var showPathInterval;
// 定时器
var intervals = new Array(20);
for (var i = 0; i < intervals.length; i++) {
    clearInterval(intervals[i]);
}
;

function appApi(code) {

    var appApi = {

        // 验证码
        "LOGIN_VERIFY": APP_DEV_ENV ? "../assets/images/verify.png" : $.getWebRootPath("kaptcha/kaptcha.jpg"),
        // 登录 0>验证码错误 “角色名”>登录成功 账号或密码错误>在status中返回错误信息
        "LOGIN": APP_DEV_ENV ? "./jsons/userMessage.json" : $.getWebRootPath("sysManager/login"),

        //数据返回监听    "ws://172.17.225.125:8080/dataManagerWeb/websocket"
        "SOCKET_URL": APP_DEV_ENV ? "ws://localhost:8687" :"ws://172.28.3.201:8090/dataManagerWeb/websocket" ,
        // 修改密码
        "INDEX_UPDATEPWD": APP_DEV_ENV ? "./jsons/onoff.json" : $.getWebRootPath("sysManager/chgPwd"),
        // 退出
        "LOGOUT": APP_DEV_ENV ? "login.html" : $.getWebRootPath("logout"),

        // 分页
        "PAGE_SIZE": 10,
        // 所有系统导航  $.getWebRootPath("./jsons/allSysLink.json")
        "ALL_SYSTEM_LINK": APP_DEV_ENV ? "./jsons/allSysLink.json" : "./jsons/allSysLink.json",

        //大屏展示
        // 安全监管信息
        "SAFETY_INFO": APP_DEV_ENV ? "./json/index/safetyInfo.json" : $.getWebRootPath("cloudDataView/viewCloudDataSources"),
        // 安全监管信息
        "RUN_STATE": APP_DEV_ENV ? "./json/index/runState.json" : $.getWebRootPath("cloudDataView/viewCloudDataWeather"),
        //安全态势
        "SAFETY_SITUATIONAL": APP_DEV_ENV ? "./json/index/situational.json" : $.getWebRootPath("cloudDataView/viewCloudDataSituational"),
        //工作负载
        "WORK_LOAD": APP_DEV_ENV ? "./json/index/workLoad.json" : $.getWebRootPath("cloudDataView/viewCloudDataWorkLoad"),
        //综合管理平台
        "MANAGE_PLATFORM": APP_DEV_ENV ? "./json/index/manage.json" : $.getWebRootPath("cloudDataView/viewCloudDataSystems"),
        //资源状态
        "RESOURCE_STATE": APP_DEV_ENV ? "./json/index/resource.json" : $.getWebRootPath("dataManager/statSysSafeIndexById"),
        //资源访问量
        "RESOURCE_TRAFFIC": APP_DEV_ENV ? "./json/index/traffic.json" : $.getWebRootPath("dataManager/findRankOfResourceAccess"),
        //审计告警
        "AUDIT_ALARM": APP_DEV_ENV ? "./json/index/alarm.json" :$.getWebRootPath("dataManager/findNewlyRiskEvent"),
        //风险级别
        "LEVEL_RISK": APP_DEV_ENV ? "./json/index/risk.json" : $.getWebRootPath("dataManager/findRiskLevelStatistic"),
        //综合管理平台详细信息查询
        "MANAGE_INFO": APP_DEV_ENV ? "./json/index/info.json" : $.getWebRootPath("cloudDataView/viewCloudDataSystemsInfo"),

    };

    return DEV_TEST ? appApi[code] : "analysis" + appApi[code];
}